<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8"/>
  <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
  <meta content="ie=edge" http-equiv="X-UA-Compatible"/>
  <title>悦听player</title>
  <!-- 样式 -->
  <link href="./css/index_music.css" rel="stylesheet">
</head>

<body>
  <div class="wrap">
    <!-- 播放器主体区域 -->
    <div class="play_wrap" id="player">
      <div class="search_bar">
        <img alt="" src="images/player_title.png"/>
        <!-- 搜索歌曲 -->
        <input @keyup.enter="searchMusic" autocomplete="off" type="text" v-model="query">
      </div>
      <div class="center_con">
        <!-- 搜索歌曲列表 -->
        <div class='song_wrapper' ref='song_wrapper'>
          <ul class="song_list">
            <li v-for="item in musicList">
              <a @click="playMusic(item.id)" href="javascript:;"></a>
              <b>{{ item.name }}</b>
              <span v-if="item.mvid !== 0" v-on:click="playMv(item.mvid)"><i></i></span>
            </li>
            <!--<li><a href="javascript:;"></a> <b>后来的我们</b> <span><i></i></span></li>-->
          </ul>
          <img alt="" class="switch_btn" src="images/line.png">
        </div>
        <!-- 歌曲信息容器 -->

        <div class="player_con" v-bind:class="{playing:isPlaying}">
          <img class="play_bar" src="images/player_bar.png"/>
          <!-- 黑胶碟片 -->
          <img class="disc autoRotate" src="images/disc.png"/>
          <img class="cover autoRotate" v-bind:src="musicCover"/>
        </div>
        <!-- 评论容器 -->
        <div class="comment_wrapper">
          <h5 class='title'>热门留言</h5>
          <div class="comment_list">
            <dl v-for="item in hotComments">
              <dt>
                <!-- data.hotComments[0].user.avatarUrl-->
                <img alt="" v-bind:src="item.user.avatarUrl">
              </dt>
              <dd class="name">{{ item.user.nickname }}</dd>
              <dd class="detail">{{ item.content }}</dd>
            </dl>
          </div>
          <img class="right_line" src="images/line.png">
        </div>
      </div>
      <div class="audio_con">
        <audio autoplay class="myaudio" controls loop ref='audio' v-bind:src="musicUrl" v-on:pause="pause"
               v-on:play="play">

        </audio>
      </div>
      <div class="video_con" style="display: none;" v-show="isShow">
        <video controls="controls" v-bind:src="mvUrl"></video>
        <div class="mask" v-on:click="hide"></div>
      </div>
    </div>
  </div>
  <!-- 开发环境版本，包含了有帮助的命令行警告 -->
  <script src="js/vue.js"></script>
  <!-- 官网提供的 axios 在线地址 -->
  <script src="lib/axios.js"></script>
  <script src="./js/main_music.js"></script>
</body>

</html>
